package com.bsj.travel.mapper.mysql;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bsj.travel.def.common.DO.RoleDO;
import com.bsj.travel.def.common.DTO.web.role.RoleSearchDTO;
import com.bsj.travel.def.common.VO.RoleVO;
import org.springframework.stereotype.Repository;

import java.util.List;

/***
 * @description RoleMapper
 * @author LiJiaXin
 * @version 1.0.0
 * @time 2024/1/11 14:27
 **/
@Repository
@DS("master")
public interface RoleMapper extends BaseMapper<RoleDO> {

    /**
     * 按指定条件统计数量
     *
     * @param roleSearchDTO
     * @return java.lang.Integer
     * @author ljx
     * @time 2024/1/12 10:24
     */
    Integer countByCondition(RoleSearchDTO roleSearchDTO);

    /**
     * 角色分页
     *
     * @param roleSearchDTO
     * @return java.util.List<com.bsj.travel.def.common.VO.RoleVO>
     * @author ljx
     * @time 2024/1/12 14:55
     */
    List<RoleVO> selectRolePage(RoleSearchDTO roleSearchDTO);
}
